const sequelize = require("sequelize");
const db = require("../../../database");

const admin = db.define(
  "admin",
  {
    id: {
      type: sequelize.INTEGER,
      primaryKey: true,
      autoIncrement: true,
      allowNull: false,
      field: "id",
    },
    username: {
      type: sequelize.STRING(100),
      allowNull: false,
      field: "username",
    },
    password: {
      type: sequelize.STRING(100),
      allowNull: false,
      field: "password",
    },
  },
  { timestamps: true }
);
(async () => {
  await db.sync({ alter: true });
})();
module.exports = admin;
